#pragma once

#include "Core.h"
#include "Window.h"
#include "Events/ApplicationEvent.h"
#include "LayerStack.h"



namespace Rpg {
	class RPG_API Application
	{
	public:
		Application();
		virtual ~Application();
		
	public:
		void Run();
		void OnEvent(Event& e);
		bool OnWindowClose(WindowCloseEvent& e);
		void PushLayer(Layer* layer);
		void PushOverLayer(Layer* layer);
		static Application& Get() {
			return *m_instance;
		}
		Window& GetWindow() {
			return *m_Window;
		}
	private:
	
		std::unique_ptr<Window> m_Window;
		bool m_Running = true;
		LayerStack m_LayerStack;
		static Application* m_instance;
	};
	Application* CreateApplication();
}
